/*
 * cui.cpp
 *
 *  Created on: 2010-11-21
 *      Author: leo
 */
#include <iostream>
#include <cstdlib>
#include <cassert>

#include <gtest/gtest.h>

#include "LocalTask.h"
#include "TimingEngine.h"

using namespace std;

TEST(CreateLocalTask, defaultCtor)
{
	// start timing engine
	GTD::TimingEngine tg;
	tg.startEngine();
	int i = 0;
	while (i++ < 2) {
		tg.registTask(GTD::LocalTask(string("task")));
		GTD::TimingEngine::dumpTasks();
		sleep(3);
	}
	ASSERT_EQ (2, GTD::TimingEngine::getTasksCnt());
	tg.stopEngine();
}



int main(int argc, char * argv[])
{
//	int ret = 0;
	::testing::InitGoogleTest(&argc, argv);
	return RUN_ALL_TESTS();
//	return ret;
}
